<?php
class film_categories extends CWidget
{
	public $categories;
    public function init()
    {
        parent::init();
    }
    public function run()
    {
    	$this->getCategories();
    	if(isset($this->categories))
        {
         	$this->render('film_categories',array('categories'=>$this->categories));
        }
    }
	function getCategories(){
    	$this->categories=Category::model()->findAll(
    			array(
    				'condition'=>'t.hot=1',
    				'order'=>'t.order DESC',
    			)
    		);
    }
	
}
?>